<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    //设置
    window.localStorage.setItem("pname",'平板');

    //删除
    window.localStorage.removeItem("pname");

    //获取
    var pname = window.localStorage.getItem("pname");
    console.log(pname)


    var pid =window.localStorage.getItem("pid");
    console.log(pid)
</script>
</body>
</html>